<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/10/26
 * Time: 9:29
 */

namespace app\qgroup\Event;


class Event
{
    /**
     * 运行事件
     * @param array ...$args
     * @return bool|mixed
     */
    public static function run(...$args)
    {
        $className = $args[0];
        foreach ($args as $key => $arg){
            if ($key == 0){
                continue;
            }
            $res [] = $arg;
        }
        $className = __NAMESPACE__.'\\'.$className;
        if (class_exists($className)){
            return call_user_func_array([$className,'run'],$res);
        }else {
            return false;
        }
    }
}